//
//  ATTrackingManager+Ext.swift
//  TTCOM-iOS
//
//  Created by Toj on 11/1/22.
//

import Foundation
import AppTrackingTransparency

public enum ATTrackingAuthorizationStatus: Int {
    case notDetermined = 0
    case restricted = 1
    case denied = 2
    case authorized = 3
}

@available(iOS 14, *)
public extension ATTrackingManager.AuthorizationStatus {
    var at_status: ATTrackingAuthorizationStatus {
        switch self {
        case .restricted:
            return .restricted
        case .denied:
            return .denied
        case .authorized:
            return .authorized
        default:
            return .notDetermined
        }
    }
}
